import request from '../units/request'

const api = {
    login:'/api/login',//登陆
    start:'/api/index/article/list',
    class:'/api/category/list',
    classand:'/api/category/article/list',
    tag:'/api/tag/list',
    detail:'/api/article/detail',
    archive:'/api/archive/list',
    panel:'/api/admin/dashboard/article/statistics',
    article:'/api/admin/article/list ',
    articleDel:'/api/admin/article/delete ',
    category:'/api/admin/category/list  ',
    categoryDel:'/api/admin/category/delete   ',
    categoryAdd:'/api/admin/category/add   ',
    tagList:'/api/admin/tag/list',
    tagDel:'/api/admin/tag/delete',
    setList:'/api/admin/blog/setting/detail',

    update:'/api/admin/blog/setting/update',
}

// 登录
// @param {userName,passWprd} obj

export function Login(obj){
    return request({
        url:api.login,
        method:"post",
        data:obj
    })
}
export function Start(obj){
    return request({
        url:api.start,
        method:"post",
        data:obj
    })
}
export function Class(obj){
    return request({
        url:api.class,
        method:"post",
        data:obj
    })
}
export function ClassAnd(obj){
    return request({
        url:api.classand,
        method:"post",
        data:obj
    })
}
export function Tag(obj){
    return request({
        url:api.tag,
        method:"post",
        data:obj
    })
}
export function Detail(obj){
    return request({
        url:api.detail,
        method:"post",
        data:obj
    })
}
export function Archive(obj){
    return request({
        url:api.archive,
        method:"post",
        data:obj
    })
}
export function Panel(obj){
    return request({
        url:api.panel,
        method:"post",
        data:obj
    })
}
export function Article(obj){
    return request({
        url:api.article,
        method:"post",
        data:obj
    })
}
export function ArticleDel(obj){
    return request({
        url:api.articleDel,
        method:"post",
        data:obj
    })
}
export function Category(obj){
    return request({
        url:api.category,
        method:"post",
        data:obj
    })
}
export function CategoryDel(obj){
    return request({
        url:api.categoryDel,
        method:"post",
        data:obj
    })
}
export function CategoryAdd(obj){
    return request({
        url:api.categoryAdd,
        method:"post",
        data:obj
    })
}
export function TagList(obj){
    return request({
        url:api.tagList,
        method:"post",
        data:obj
    })
}
export function TagDel(obj){
    return request({
        url:api.tagDel,
        method:"post",
        data:obj
    })
}
export function SetList(obj){
    return request({
        url:api.setList,
        method:"post",
        data:obj
    })
}
export function Update(obj){
    return request({
        url:api.update,
        method:"post",
        data:obj
    })
}